home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 19
/
Mac Magazin and MacEasy Magazine CD - Issue 19.iso
/
Musik & Kunst
/
Ear Workout 2.1
/
source code
/
ear_prototypes.h
< prev
next >
Wrap
Text File
|
1996-01-09
|
6KB
|
154 lines
void make_chord_help_window();
//----------------------------------------------------------------
// from ear_calc.h
//----------------------------------------------------------------
void make_wave_table(unsigned char *final_wave_table,
double *temp_wave_table,
int kind,
double amplitude,
int wave_table_size,
int make_temp_wave_table);
double random_double();
void init_random();
int random_integer(int n);
double small_integer_ratio();
int small_integer();
void bail_out(char *);
int fget_line(char *line,FILE *f);
void debug_print(char *message);
double choose_duration(double typical_tempo);
//----------------------------------------------------------------
// from ear_mac_util.cp
//----------------------------------------------------------------
#if NEED_MAC_STUFF
void copy_pascal_string(Str255 to,Str255 from);
void watch_cursor();
void arrow_cursor();
void normal_text_style();
#endif
//----------------------------------------------------------------
// from ear_sound.cp
//----------------------------------------------------------------
#if NEED_MAC_STUFF
void do_waveforms(
SndChannelPtr *my_snd_chan,
int kind,
double amplitude,
int chans_used,
unsigned char *wave_table,
double *temp_storage,
int wave_table_size);
void install_waveforms(int nchan,SndChannelPtr *my_snd_chan,
unsigned char *my_wave_table,int wave_table_size,
short *kind_of_chan_list);
void play_chord(int notes_in_chord,
SndChannelPtr *my_snd_chan,
int *note,
int duration, //-- in half-milliseconds
int if_wait);
void wait_until_chan_not_busy(SndChannelPtr my_snd_chan,int max_secs);
void rest(int nhalf_ms);
void delay_some(int nticks);
void make_sound_channels(
int chans_used,
long *init_chan_list,
short *kind_of_chan_list,
SndChannelPtr *my_snd_chan);
void dispose_of_chans(
int chans_used,
SndChannelPtr *my_snd_chan);
void set_up_sound();
#endif
// ...NEED_MAC_STUFF
//----------------------------------------------------------------
// from ear_chord_calc.cp
//----------------------------------------------------------------
int make_canonical_voicing(int *canonical_voicing,int *chord,int n_notes);
int compare_squishedness(int *a,int *b,int n_notes);
int same_canonical_form(int *a,int na,int *b,int nb);
int compare_chords(int *a,int *b,int n_notes);
int identical_chords(int *a,int *b,int n_notes);
int dissonance(int *chord,int n_notes);
void copy_chord(int *a,int *b,int n);
void swap_chords(int *a,int *b,int n);
int make_0_to_11(int n);
int inversion_of_interval(int n);
void sort_int_list(int *a,int n);
void make_chord(int *chord,int *n,int *chord_items,int n_items);
void add_note_to_chord(int *chord,int *n,int note);
void remove_note_from_chord(int *chord,int *n,int note);
int how_unusual_is_basic_chord(int basic_chord);
int how_unusual_is_added_tone(int tone);
double avg_chord(int *chord,int n);
int is_in_list(int *list,int n,int what);
void add_to_list(int *list,int *n,int what);
void remove_from_list(int *list,int *n,int what);
int where_in_list(int *list,int n,int what);
void describe_chord(char *s,int n,int *items);
void describe_basic_chord(char *s,int basic);
void describe_added_tone(char *s,int basic);
void simplify_chord(int *items,int *n);
int items_describe_same_chord(int *items1,int nitems1,int *items2,int nitems2);
int find_basic_chord(int *items,int n);
int what_is_3_of_chord(int basic_chord);
int what_is_5_of_chord(int basic_chord);
int what_is_7_of_chord(int basic_chord);
void remove_doublings(int *chord,int *n);
int how_unusual_is_chord(int *items,int n);
int note_to_chord_item(int note);
void analyze_chord_based_on_this_root(int *items,int *n_items,int *ch,int n,int root);
void notes_to_items(int *items,int *n_items,int *chord,int n_notes);
unsigned long canonical_voicing_to_quick_label(int *notes,int n);
int quick_label_to_canonical_chord_number(unsigned long quick_label,int n_notes);
unsigned long notes_to_quick_label(int *notes,int n);
int chord_item_to_interval(int item);
int chord_item_to_scale_position(int item);
int letter_and_accidental_to_note(int letter,int accidental);
void spell_note_as_part_of_chord(
int *err, // == 0 normally
int *note_letter, // C=0, D=1, ... B=6
int *accidental, // natural=0, flat=-1, sharp=1, double flat=-2, ...
int interval_above_root, // note to spell, in units of semitones
int root_letter,
int root_accidental,
int *items,
int n_items,
int spell_dim7_enharmonically);
int lists_are_same_except_for_order(int n1,int *l1,int n2,int *l2);
int nifty_chord_number(int *notes,int n);
void describe_accidental(char *s,int accidental);
//----------------------------------------------------------------
// from ear_intervals.cp
//----------------------------------------------------------------
void set_ctl_by_nifty_label(WindowPtr w,char *nifty_label,int nifty_index,
char *decoder_string,int value);
//----------------------------------------------------------------
// from complete_window.cp
//----------------------------------------------------------------
class complete_window;
void dummy_den_mother(complete_window *);
//----------------------------------------------------------------
// from ear_staff_notation.cp
//----------------------------------------------------------------
int
draw_note_head(
char *verb, // "draw","left_tangent","right_tangent", or
// "set_r","set_h","set_phi_deg"
int x,
int y, // center of note in current coords
int if_filled, // filled, like 1/4 note, or open, like 1/2?
void *output_info, // Point * for tangents
void *style_info // pointer to double for set_r, set_h, or set_phi_deg
);
void draw_staff(Rect *rec);
int
draw_clef(
char *verb, // "draw"
char *noun, // "g_clef", "f_clef"
int x, // horiz center of clef sign
int y, // center line of staff
double h, // dist between lines of staff
void *output_info,
void *style_info);